#-*- coding:utf-8 -*- 
'''
Created on 2011-11-2

@author: Botao Wu
'''

def reindent(s, space_num):
    leading_space = ' ' * space_num
    lines = [leading_space + line.strip() for line in s.splitlines()]
    return '\n'.join(lines)

x = '''   line one
      line two
line three
'''

print reindent(x, 4)
print reindent(x, 6)

